package conlon.seata01.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import conlon.constant.Constant;
import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户信息
 * </p>
 *
 * @author conlon
 * @since 2021-08-16
 */
@Data
@Accessors(chain = true)
@TableName("seata_order")
public class OrderEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "不能为空")
    private String orderName;

    @TableId
    @TableField(fill = FieldFill.INSERT)
    private Long id;

    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @TableField(fill = FieldFill.INSERT)
    private Long createdUserId;

    @TableField(fill = FieldFill.INSERT)
    private String createdUserName;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifiedTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long modifiedUserId;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String modifiedUserName;

    @TableLogic(value = Constant.DELETE_DISABLE + "", delval = Constant.DELETE_ENABLE + "")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;


}